package com.lcj.OwnerMyBatis.utils;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

/**
 * @Author：liuchangjun
 * @Date：2021/10/27
 */
@NoArgsConstructor
@Data
public class ParameterMappingTokenHandler implements TokenHandler{

    private List<ParameterMapping> parameterMappings = new ArrayList();


    public List<ParameterMapping> getParameterMappings() {
        return this.parameterMappings;
    }

    public String handleToken(String content) {
        this.parameterMappings.add(this.buildParameterMapping(content));
        return "?";
    }

    private ParameterMapping buildParameterMapping(String content) {
        ParameterMapping parameterMapping = new ParameterMapping(content);
        return parameterMapping;
    }

}
